<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增供应商档案')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-supplier-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">公司代码：</label>
                <div class="col-sm-8">
                    <input name="code" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">公司名称：</label>
                <div class="col-sm-8">
                    <input name="title" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公司简称：</label>
                <div class="col-sm-8">
                    <input name="shortTitle" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公司评级：</label>
                <div class="col-sm-8">
                    <select name="level" class="form-control m-b" th:with="type=${@dict.getType('company_level')}">
                        <option value="">--请选择--</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公司优势：</label>
                <div class="col-sm-8">
                    <input name="advantage" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">注册时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="foundDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">注册资本(万)：</label>
                <div class="col-sm-8">
                    <input name="capital" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工人数：</label>
                <div class="col-sm-8">
                    <input name="employeeSize" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">年营业额：</label>
                <div class="col-sm-8">
                    <input name="revenue" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">企业性质：</label>
                <div class="col-sm-8">
                    <select name="comanpyType" class="form-control m-b" th:with="type=${@dict.getType('company_type')}">
                        <option value="">--请选择--</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/supplier"
        $("#form-supplier-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
            }
        }

        $("input[name='foundDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>